package com.example.content;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

public class MainActivity2 extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        Intent intent = getIntent();
        String msg = intent.getStringExtra("msg");
        TextView text =(TextView) findViewById(R.id.mytext2);
        text.setText(msg);
        System.out.println(msg);
    }

    @Override
    protected void onStart() {
        super.onStart();
        Log.w("mylog", "onStart: b");
    }
}